﻿using System;
using System.IO;
using System.Windows;

namespace Avivo.Common
{
	public class ResourceHelper
	{
		public static string GetString(string relativePath)
		{
			var uri = new Uri(@"/wp7vd;component/" + relativePath, UriKind.RelativeOrAbsolute);
			using (var stream = Application.GetResourceStream(uri).Stream)
			{
				using (var reader = new StreamReader(stream))
				{
					string result = reader.ReadToEnd();
					return result;
				}
			}
		}
	}
}
